package com.fooddiary.service;

import java.util.List;

import com.fooddiary.model.Eating;
import com.fooddiary.model.Model;
import com.fooddiary.util.AppException;
import com.fooddiary.web.form.EatingForm;
import com.fooddiary.web.form.EatingTypeForm;
import com.fooddiary.web.form.WeightForm;

/**
 * Define business logic operations for {@link Eating} entities <br>
 * @author Created by andrey.kuznetsov <br>
 * @author Last modified by $Author$ <br>
 * @author Last modified on $Date$ at revision $Revision$ <br>
 */
public interface IEatingService {

	/**
	 * Returns eating form from list of eatings form of {@link WeightForm}
	 * @param p_id - unique id of eating; {@link Integer} <br>
	 * @param p_weightId - unique id of weight; {@link Integer} <br>
	 * @return {@link EatingForm}
	 */
	public EatingForm initEatingForm(Integer p_id, Integer p_weightId) throws AppException;
	
	/**
	 * Saves eating record to database <br>
	 * @param p_model - current model; {@link Model} <br>
	 * @param p_eatingForm - {@link EatingForm} <br>
	 * @return {@link EatingForm}
	 */
	public EatingForm saveEatingForm(Model p_model, EatingForm p_eatingForm) throws AppException;
	
	/**
	 * Fills eating type forms list for select elemnt <br>
	 * @return {@link List}<{@link EatingTypeForm}>
	 */
	public List<EatingTypeForm> fillEatingTypesList();
}
